<template>
  <div>
    <div class="banner" @click="handleBannerClick">
      <img class="banner-img" src="//img1.qunarzz.com/sight/p0/1511/34/34170b200db08a5a90.img.jpg_600x330_9fee26e9.jpg" />
      <div class="banner-info">
        <div class="banner-tittle">
          隐贤上庄(AAAA景区)
        </div>
        <div class="banner-number">
          <span class="iconfont">&#xe60f;</span>
          39
        </div>
      </div>
    </div>
    <common-gallery :imgs="imgs" v-show="showGallery" @close="handleGalleryClose"></common-gallery>
  </div>
</template>

<script>
import CommonGallery from "common/gallery/Gallery"
export default {
  name: "DetailBanner",
  data () {
    return {
      showGallery: false,
      imgs: ["http://img1.qunarzz.com/sight/p0/1511/ea/ea7eda2c3e879ed90.img.jpg_r_800x800_95d56924.jpg"]
    }
  },
  methods: {
    handleBannerClick () {
      this.showGallery = true
    },
    handleGalleryClose () {
      this.showGallery = false
    }
  },
  components: {
    CommonGallery
  }
}
</script>

<style lang="stylus" scoped>
  .banner
    position: relative
    overflow: hidden
    height: 0
    padding-bottom: 55%
    .banner-img
      width: 100%
    .banner-info
      display: flex
      position: absolute
      left: 0
      right: 0
      bottom: 0
      line-height: .6rem
      color: #fff
      background-image: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.8))
      .banner-tittle
        flex: 1
        padding: 0 .2rem
        font-size: .32rem
      .banner-number
        height: .32rem
        line-height: .32rem
        margin-top: .14rem
        padding: 0 .4rem
        border-radius: .2rem
        background: rgba(0,0,0,.8)
        font-size: .24rem
</style>
